package com.atqh.srrt.chicken.service.impl;

import com.atqh.srrt.chicken.Vo.ArticleBodyVo;
import com.atqh.srrt.chicken.domain.blog.ArticleBody;
import com.atqh.srrt.chicken.service.ArticleBodyService;
import com.atqh.srrt.chicken.mapper.blogMapper.ArticleBodyMapper;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

/**
 * @作者：大叔azhe
 * @api：详细描述
 * @创建时间：16:26 2022/8/17
 */
@Service
public class ArticleBodyServiceImpl implements ArticleBodyService {
    @Autowired
    private ArticleBodyMapper articleBodyMapper;

    @Override
    public ArticleBodyVo findArticleBodyById(Long bodyId) {
        ArticleBody articleBody = articleBodyMapper.selectById(bodyId);
        ArticleBodyVo articleBodyVo = new ArticleBodyVo();
        articleBodyVo.setContent(articleBody.getContent());
        articleBodyVo.setContenthtml(articleBody.getContentHtml());
        return articleBodyVo;
    }
}
